 <%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.text.DateFormat"%>
<%@page import="br.com.cliente.Cliente"%>
<%@page import="java.util.List"%>
<%@page import="br.com.cliente.ControleCliente"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Relatorio Cliente</title>
<script type="text/javascript" src="js/arquivos.js"></script>
</head>

<body>
   
   <script>
     function funcao()
     {
         document.getElementById("demo").innerHTML="Meu primeiro PG";
     }
   </script>
   <p id="demo"></p>
   <button type="button" onclick="funcao()">Achou</button>
  <table border="1">
        <%
        try{
        	DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
            ControleCliente dao = new ControleCliente();
            List<Cliente> lista =dao.retornaCliente("%%");
            Cliente c1;
            for(int i=0;i<lista.size();i++){
            	c1 = new Cliente();
        %>
          <tr>
              <td><%=lista.get(i).getNome()%></td>
               <td><%=lista.get(i).getEmail()%></td>
              <td><%=lista.get(i).getEndereco()%></td>
              <td><%=df.format(lista.get(i).getNacimento().getTime())%></td>
          </tr>
<%}
            
        }catch(Exception e){
         System.out.println("Erro :"+e.getMessage());
        }    
            %>
         </table>
</body>
</html>





